package com.py.credit.dao;

import com.py.credit.common.Page;
import com.py.credit.entity.WarningDealEntity;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public interface WarningDealDao {

    List<Map<String, Object>> selectWarningDealListByConditionForPage(@Param(value = "columns") List<String> showColumns,
                                                                      @Param(value = "additionalColumns") String[] additionalColumns,
                                                                      @Param(value = "conditions") List<String> conditions,
                                                                      @Param(value = "page") Page page);

    LinkedHashMap selectDetailById(@Param(value = "id") String id);

    int selectWarningDealDeptNum(@Param(value = "deptId") Long deptId,
                                 @Param(value = "flag") String flag,
                                 @Param(value = "startTime") String startTime,
                                 @Param(value = "endTime") String endTime);

    List<LinkedHashMap> selectWarningDealChartTop10(@Param(value = "order") String order,
                                                    @Param(value = "startTime") String startTime,
                                                    @Param(value = "endTime") String endTime);

    int addLog(WarningDealEntity warningDealEntity);

    void updateLog(@Param(value = "logId") int logId,
                   @Param(value = "ajbh") String ajbh);

    List<LinkedHashMap> selectAjbhList(@Param(value = "ajbhList") List<String> ajbhList);

    String selectDeptNameById(@Param(value = "deptId") Long deptId);
}